1. Field of the Invention
The invention relates to a System-on-Chip (SOC), and, more particularly, to a programmable SOC apparatus and a method for updating firmware in programmable SOC apparatus.
2. Description of the Related Art
FIG. 1A is a data flow diagram showing that boot loader codes are being programmed into a SOC via a burner 170 according to prior art. FIG. 1B is a data flow diagram showing that a microcontroller programs firmware executed in a normal mode into the SOC after executing the boot loader codes and connecting with a computer host according to prior art.
Throughout the specification and claims, the following terms take the meanings explicitly associated herein, unless the context clearly dictates otherwise. The term “in system programming (ISP) mode” refers to a mode in which the SOC executes the boot loader codes to program firmware into a non-volatile memory. In contrast, the term “normal mode” refers to a mode in which the SOC executes firmware to implement specialized functions or service. For example, if it is a cellular phone system, the firmware that the SOC executes needs to realize wireless communication.
Conventionally, updating firmware comprises two steps as follows. Step 1: As showing in FIG. 1A, at first, place a SOC 100 into a burner 170. Next, boot loader codes are programmed into the flash memory 130B via the burner 170 and a logic circuit 120. Wherein, the burner 170 can be also controlled by another controller (such as a computer host). Step 2: As showing in FIG. 1B, while attempting to update firmware, the SOC 100 enters an ISP mode first. At this moment, the microcontroller 110 starts to execute the boot loader codes and the SOC 100 connects with the computer host 160 via the microcontroller 110 and a transmission interface 140. Then, the SOC 100 moves or loads firmware that is executed in a normal mode from the computer host 160 into a flash memory 130A via the microcontroller 110. Afterwards, while the SOC 100 enters the normal mode, the microcontroller 110 starts to execute firmware stored in the flash memory 130A.
As previously discussed, conventionally, it is necessary for an updating firmware procedure to use a burner 170 which programs the flash memory 130B with the boot loader codes. In addition, the SOC 100 needs two flash memories: the flash memory 130A for storing the boot loader codes and the flash memory 130B for storing firmware that the SOC 100 executes in the normal mode. However, the flash memory 130B is not used in the normal mode, but in the ISP mode, causing a waste of resource. Thus, the conventional method for updating firmware, as a whole, yields a relatively high hardware cost and has an inconvenient programming procedure.